import request from '@/utils/request'

// 查询机器激活列表
export function listActivation(query) {
  return request({
    url: '/machine/activation/list',
    method: 'get',
    params: query
  })
}

// 查询机器激活详细
export function getActivation(id) {
  return request({
    url: '/machine/activation/' + id,
    method: 'get'
  })
}

// 新增机器激活
export function addActivation(data) {
  return request({
    url: '/machine/activation',
    method: 'post',
    data: data
  })
}

// 修改机器激活
export function updateActivation(data) {
  return request({
    url: '/machine/activation',
    method: 'put',
    data: data
  })
}

// 删除机器激活
export function delActivation(id) {
  return request({
    url: '/machine/activation/' + id,
    method: 'delete'
  })
}

// 生成激活码
export function generateActiveCodes(data) {
  return request({
    url: '/machine/code/generate',
    method: 'post',
    data: data
  })
}
